﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StoreWeb.system.lowDealers
{
    public partial class edit : System.Web.UI.Page
    {
        //BLL.Role role = new BLL.Role();
        BLL.DealersManage userdealers = new BLL.DealersManage();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hidid.Value = Request.QueryString["id"];
                if (!string.IsNullOrEmpty(hidid.Value))
                {
                    Model.DealersManage ne = userdealers.GetModel(Convert.ToInt32(hidid.Value));
                    username.Value = ne.username;
                    dealers.Value = ne.dealersid;

                    if (ne.dealersid!="0")
                    {
                        selsectdealers.Value = userdealers.GetModel(Convert.ToInt32(ne.dealersid)).username + "【" + userdealers.GetModel(Convert.ToInt32(ne.dealersid)).dealersgrade + "级】";
                    }
                   
                    //mobile.Value = ne.mobile;
                    mobile.Value = ne.mobile;
                    hids_province.Value = ne.s_province;
                    hids_city.Value = ne.s_city;
                    hids_county.Value = ne.s_county;
                    description.Text = ne.description;

                    //loginname.Value = ne.loginname;
                    //password.Value = ne.password;
                    description.Text = ne.description;
                    discountrate.Value = ne.discountrate;
                }
            }
        }
    }
}